package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;

import java.math.BigInteger;
import java.util.Objects;

public class UserMarriageData extends DataObject {

    private long userId;
    /**
     * 是否接受指向联姻
     */
    private boolean isAcceptAppoint;
    /**
     * 全服联姻刷新次数
     */
    private int serverApplyRefreshTimes;
    /**
     * 购买全服联姻刷新次数
     */
    private int buyServerApplyRefreshTimes;
    /**
     * 离线联姻次数
     */
    private int offlineMarriageTimes;
    /**
     * 累计联姻次数
     */
    private long totalMarriageTimes;

    private long modifyTime;

    private long lastMarriageApplyNotifyTime;          //最近一次指向联姻请求通知时间

    private long totalLonelyCount;                //孤独终老子嗣数量

    private BigInteger maxChildEarnSpeed = BigInteger.ZERO;     //子嗣最大赚速
    /**
     * 跨服联姻刷新次数
     */
    private int crossServerApplyRefreshTimes;
    /**
     * 购买跨服联姻刷新次数
     */
    private int buyCrossServerApplyRefreshTimes;
    /**
     * 是否接受跨服指向联姻
     */
    private boolean isAcceptCrossAppoint;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public boolean isAcceptAppoint() {
        return isAcceptAppoint;
    }

    public void setAcceptAppoint(boolean acceptAppoint) {
        if(this.isAcceptAppoint != acceptAppoint) {
            isAcceptAppoint = acceptAppoint;
            setUpdateOption();
        }
    }

    public int getServerApplyRefreshTimes() {
        return serverApplyRefreshTimes;
    }

    public void setServerApplyRefreshTimes(int serverApplyRefreshTimes) {
        if(this.serverApplyRefreshTimes != serverApplyRefreshTimes) {
            this.serverApplyRefreshTimes = serverApplyRefreshTimes;
            setUpdateOption();
        }
    }

    public int getBuyServerApplyRefreshTimes() {
        return buyServerApplyRefreshTimes;
    }

    public void setBuyServerApplyRefreshTimes(int buyServerApplyRefreshTimes) {
        if(this.buyServerApplyRefreshTimes != buyServerApplyRefreshTimes) {
            this.buyServerApplyRefreshTimes = buyServerApplyRefreshTimes;
            setUpdateOption();
        }
    }

    public int getOfflineMarriageTimes() {
        return offlineMarriageTimes;
    }

    public void setOfflineMarriageTimes(int offlineMarriageTimes) {
        if(this.offlineMarriageTimes != offlineMarriageTimes) {
            this.offlineMarriageTimes = offlineMarriageTimes;
            setUpdateOption();
        }
    }

    public long getTotalMarriageTimes() {
        return totalMarriageTimes;
    }

    public void setTotalMarriageTimes(long totalMarriageTimes) {
        if(this.totalMarriageTimes != totalMarriageTimes) {
            this.totalMarriageTimes = totalMarriageTimes;
            setUpdateOption();
        }
    }

    public long getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(long modifyTime) {
        if(this.modifyTime != modifyTime) {
            this.modifyTime = modifyTime;
            setUpdateOption();
        }
    }

    public long getLastMarriageApplyNotifyTime() {
        return lastMarriageApplyNotifyTime;
    }

    public void setLastMarriageApplyNotifyTime(long lastMarriageApplyNotifyTime) {
        if(this.lastMarriageApplyNotifyTime != lastMarriageApplyNotifyTime) {
            this.lastMarriageApplyNotifyTime = lastMarriageApplyNotifyTime;
            setUpdateOption();
        }
    }

    public long getTotalLonelyCount() {
        return totalLonelyCount;
    }

    public void setTotalLonelyCount(long totalLonelyCount) {
        if(this.totalLonelyCount != totalLonelyCount) {
            this.totalLonelyCount = totalLonelyCount;
            setUpdateOption();
        }
    }

    public BigInteger getMaxChildEarnSpeed() {
        return maxChildEarnSpeed;
    }

    public void setMaxChildEarnSpeed(BigInteger maxChildEarnSpeed) {
        if(!Objects.equals(this.maxChildEarnSpeed, maxChildEarnSpeed)){
            this.maxChildEarnSpeed = maxChildEarnSpeed;
            setUpdateOption();
        }
    }

    public int getCrossServerApplyRefreshTimes() {
        return crossServerApplyRefreshTimes;
    }

    public void setCrossServerApplyRefreshTimes(int crossServerApplyRefreshTimes) {
        if(this.crossServerApplyRefreshTimes != crossServerApplyRefreshTimes) {
            this.crossServerApplyRefreshTimes = crossServerApplyRefreshTimes;
            setUpdateOption();
        }
    }

    public int getBuyCrossServerApplyRefreshTimes() {
        return buyCrossServerApplyRefreshTimes;
    }

    public void setBuyCrossServerApplyRefreshTimes(int buyCrossServerApplyRefreshTimes) {
        if(this.buyCrossServerApplyRefreshTimes != buyCrossServerApplyRefreshTimes) {
            this.buyCrossServerApplyRefreshTimes = buyCrossServerApplyRefreshTimes;
            setUpdateOption();
        }
    }

    public boolean isAcceptCrossAppoint() {
        return isAcceptCrossAppoint;
    }

    public void setAcceptCrossAppoint(boolean acceptCrossAppoint) {
        if(this.isAcceptCrossAppoint != acceptCrossAppoint) {
            isAcceptCrossAppoint = acceptCrossAppoint;
            setUpdateOption();
        }
    }
}
